package com.runfast.waimai.dao.mapper;

import com.runfast.common.dao.IMapper;
import com.runfast.waimai.dao.model.RunfastBusinessDaily;
import com.runfast.waimai.dao.model.RunfastBusinessDailyExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

@Mapper
public interface RunfastBusinessDailyMapper extends IMapper<RunfastBusinessDaily, Integer, RunfastBusinessDailyExample> {
    Map<String,Object> getStats(RunfastBusinessDailyExample example);

    List<Map<String,Object>> getTopList(RunfastBusinessDailyExample yesterdayExample);

    Integer countNoOrdersInThree(RunfastBusinessDailyExample yesterdayExample);

    Map<String,Object> countByExampleWithPageableGroupByBusinessId(@Param("example") RunfastBusinessDailyExample example, @Param("pageable") Pageable pageable);

    RunfastBusinessDaily sumByExample(RunfastBusinessDailyExample example);
}